<!--
 * @Author: your name
 * @Date: 2021-08-16 16:09:39
 * @LastEditTime: 2021-08-16 16:15:54
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \briup\3-html&css\day11\10-媒体查询内部引入.html
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body>div {
            float: left;
            border: 10px solid pink;
            font-size: 18px;
            color: aquamarine;
        }
        
        @media screen and (min-width:1024px) {
            div {
                width: calc(25% - 20px);
                height: 400px;
                background-color: burlywood;
            }
        }
        
        @media screen and (min-width:768px) and (max-width:1024px) {
            div {
                width: calc(50% - 20px);
                height: 200px;
                background-color: red;
            }
        }
        
        @media screen and (max-width:768px) {
            div {
                width: calc(100% - 20px);
                height: 100px;
                background-color: green;
            }
        }
    </style>
</head>

<body>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
</body>

</html>